
import libnum

c="HIVMURCQWQIWUHEV"
for a in range(2,27):
    for b in range(2,27):
        if libnum.gcd(a,26)==1 and a !=b:
            a1=libnum.invmod(a,26)
            flag=""
            for i in c:
                flag+=chr(a1*(ord(i)-ord("A")-b)%26+ord("A"))
            print(flag)
